package com.jcfk.eam.controller.equ;

import com.jcfk.common.web.domain.RetResult;
import com.jcfk.eam.domain.dto.base.EamSopStandardDTO;
import com.jcfk.eam.domain.dto.main.EamPointCheckOrderDTO;
import com.jcfk.eam.domain.query.base.EamSopStandardQuery;
import com.jcfk.eam.enums.AssetKind;
import com.jcfk.eam.enums.TaskKind;
import com.jcfk.eam.service.main.EamPointInspectionService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 设备点检
 */
@Api(tags = {"设备点检"})
@RestController
@RequestMapping("equPointInspection")
public class EquPointInspectionController {

    @Autowired
    private EamPointInspectionService pointInspectionService;

    /**
     * 获取点检标准列表
     * @param query
     * @return
     */
    @PostMapping("getSopStandardList")
    public RetResult<?> getSopStandardList(@RequestBody EamSopStandardQuery query){
        query.setAssetKind(AssetKind.PRODUCTION_EQUIPMENT.getValue());
        query.setTaskKind(TaskKind.POINT_INSPECTION.getValue());
        List<EamSopStandardDTO> list=pointInspectionService.getSopStandardList(query);
        return RetResult.ok(list);
    }
}
